#ifndef CONNECT_H_
#define CONNECT_H_

#include "Command.h"
#include "Protocol.h"
#include "Periodic.h"

class CommandConnect : public Command
{
public:
	CommandConnect() : Command()
	{
		MyCommandType = Connect;
		ArgumentsLength = 0;
	}

	FailCode DoCommand()
	{
		if(!IsConnected())
		{
			StartPeriodic();

			// This might help.
			SetConnected(true);

			return Success;
		}
		else
			return AlreadyDone;
	}
};

#endif /* CONNECT_H_ */
